﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using r2mp_DataStructures;

namespace r2mp_GUI
{

    /// <summary>
    /// Provides a hardcoded PSP for testing-purposes of the PSP-visualizer.
    /// </summary>
    public class PSPTest
    {

        /// <summary>
        /// Method used to generate the hardcoded PSP.
        /// </summary>
        /// <returns>The root of the PSP-datastructure which can be used to test.</returns>
        public static Task createTestPSP()
        {
            Task root = new Task();
            root.Tasks.Add(new Task("A", "1", 12, Task.Started));
            root.Tasks[0].Tasks.Add(new Task("L", "1.1", 1, Task.Finished));
            root.Tasks[0].Tasks.Add(new Task("M", "1.2", 5, Task.Started));
            root.Tasks[0].Tasks[1].Tasks.Add(new Task("P", "1.2.1", 1, Task.Finished));
            root.Tasks[0].Tasks[1].Tasks.Add(new Task("Q", "1.2.2", 1, Task.Pending));
            root.Tasks[0].Tasks[1].Tasks.Add(new Task("R", "1.2.3", 3, Task.Started));
            root.Tasks[0].Tasks[1].Tasks[2].Tasks.Add(new Task("S", "1.2.3.1", 1, Task.Pending));
            root.Tasks[0].Tasks[1].Tasks[2].Tasks.Add(new Task("T", "1.2.3.2", 2, Task.Finished));
            root.Tasks[0].Tasks.Add(new Task("N", "1.3", 3, Task.Finished));
            root.Tasks[0].Tasks.Add(new Task("O", "1.4", 3, Task.Finished));

            root.Tasks.Add(new Task("B", "2", 23, Task.Started));
            root.Tasks[1].Tasks.Add(new Task("U", "2.1", 10, Task.Started));
            root.Tasks[1].Tasks[0].Tasks.Add(new Task("AA", "2.1.1", 2, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks.Add(new Task("AB", "2.1.2", 4, Task.Started));
            root.Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AE", "2.1.2.1", 2, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AF", "2.1.2.2", 1, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AG", "2.1.2.3", 1, Task.Pending));
            root.Tasks[1].Tasks[0].Tasks.Add(new Task("AC", "2.1.3", 3, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AH", "2.1.3.1", 1, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AI", "2.1.3.2", 2, Task.Finished));
            root.Tasks[1].Tasks[0].Tasks.Add(new Task("AD", "2.1.4", 1, Task.Pending));
            root.Tasks[1].Tasks.Add(new Task("V", "2.2", 3, Task.Started));
            root.Tasks[1].Tasks.Add(new Task("W", "2.3", 2, Task.Finished));
            root.Tasks[1].Tasks.Add(new Task("X", "2.4", 3, Task.Pending));
            root.Tasks[1].Tasks.Add(new Task("Y", "2.5", 2, Task.Finished));
            root.Tasks[1].Tasks.Add(new Task("Z", "2.6", 3, Task.Started));


            root.Tasks.Add(new Task("C", "3", 54, Task.Started));
            root.Tasks[2].Tasks.Add(new Task("AJ", "3.1", 10, Task.Started));
            root.Tasks[2].Tasks.Add(new Task("AK", "3.2", 44, Task.Started));
            root.Tasks[2].Tasks[1].Tasks.Add(new Task("AL", "3.2.1", 5, Task.Finished));
            root.Tasks[2].Tasks[1].Tasks.Add(new Task("AM", "3.2.2", 19, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks.Add(new Task("AO", "3.2.2.1", 10, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks[0].Tasks.Add(new Task("AR", "3.2.2.1.1", 5, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks[0].Tasks.Add(new Task("AS", "3.2.2.1.2", 5, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AT", "3.2.2.1.2.1", 3, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks[0].Tasks[1].Tasks.Add(new Task("AU", "3.2.2.1.2.2", 2, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks.Add(new Task("AP", "3.2.2.2", 5, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks[1].Tasks.Add(new Task("AQ", "3.2.2.3", 4, Task.Pending));
            root.Tasks[2].Tasks[1].Tasks.Add(new Task("AN", "3.2.3", 20, Task.Started));
            root.Tasks[2].Tasks[1].Tasks[2].Tasks.Add(new Task("AV", "3.2.3.1", 10, Task.Finished));
            root.Tasks[2].Tasks[1].Tasks[2].Tasks.Add(new Task("AW", "3.2.3.2", 5, Task.Started));
            root.Tasks[2].Tasks[1].Tasks[2].Tasks.Add(new Task("AX", "3.2.3.3", 5, Task.Finished));


            root.Tasks.Add(new Task("D", "4", 10, Task.Pending));
            root.Tasks[3].Tasks.Add(new Task("AY", "4.1", 2, Task.Pending));
            root.Tasks[3].Tasks.Add(new Task("AZ", "4.2", 8, Task.Pending));
            root.Tasks[3].Tasks[1].Tasks.Add(new Task("BA", "4.2.1", 4, Task.Pending));
            root.Tasks[3].Tasks[1].Tasks.Add(new Task("BB", "4.2.2", 4, Task.Pending));


            root.Tasks.Add(new Task("E", "5", 1, Task.Finished));

            root.Tasks.Add(new Task("F", "6", 22, Task.Pending));

            root.Tasks.Add(new Task("G", "7", 150, Task.Started));
            root.Tasks[6].Tasks.Add(new Task("BC", "7.1", 50, Task.Started));
            root.Tasks[6].Tasks[0].Tasks.Add(new Task("BM", "7.1.1", 20, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks.Add(new Task("BR", "7.1.1.1", 7, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks.Add(new Task("BS", "7.1.1.2", 3, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks.Add(new Task("BT", "7.1.1.3", 10, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks.Add(new Task("BU", "7.1.1.3.1", 8, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks[0].Tasks.Add(new Task("BW", "7.1.1.3.1.1", 1, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks[0].Tasks.Add(new Task("BX", "7.1.1.3.1.2", 1, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks[0].Tasks.Add(new Task("BY", "7.1.1.3.1.3", 6, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks[0].Tasks[2].Tasks.Add(new Task("BZ", "7.1.1.3.1.3.1", 3, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks[0].Tasks[2].Tasks.Add(new Task("CA", "7.1.1.3.1.3.2", 3, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks[0].Tasks[2].Tasks.Add(new Task("BV", "7.1.1.3.2", 2, Task.Pending));
            root.Tasks[6].Tasks[0].Tasks.Add(new Task("BN", "7.1.2", 5, Task.Finished));
            root.Tasks[6].Tasks[0].Tasks.Add(new Task("BO", "7.1.3", 5, Task.Finished));
            root.Tasks[6].Tasks[0].Tasks.Add(new Task("BP", "7.1.4", 10, Task.Started));
            root.Tasks[6].Tasks[0].Tasks.Add(new Task("BQ", "7.1.5", 10, Task.Started));
            root.Tasks[6].Tasks.Add(new Task("BD", "7.2", 20, Task.Started));
            root.Tasks[6].Tasks.Add(new Task("BE", "7.3", 10, Task.Pending));
            root.Tasks[6].Tasks[2].Tasks.Add(new Task("BK", "7.3.1", 5, Task.Pending));
            root.Tasks[6].Tasks[2].Tasks.Add(new Task("BL", "7.3.2", 5, Task.Pending));
            root.Tasks[6].Tasks.Add(new Task("BF", "7.4", 5, Task.Finished));
            root.Tasks[6].Tasks.Add(new Task("BG", "7.5", 15, Task.Finished));
            root.Tasks[6].Tasks.Add(new Task("BH", "7.6", 10, Task.Pending));
            root.Tasks[6].Tasks.Add(new Task("BI", "7.7", 20, Task.Started));
            root.Tasks[6].Tasks[6].Tasks.Add(new Task("CB", "7.7.1", 10, Task.Started));
            root.Tasks[6].Tasks[6].Tasks[0].Tasks.Add(new Task("CE", "7.7.1.1", 5, Task.Started));
            root.Tasks[6].Tasks[6].Tasks[0].Tasks.Add(new Task("CF", "7.7.1.2", 5, Task.Started));
            root.Tasks[6].Tasks[6].Tasks.Add(new Task("CC", "7.7.2", 5, Task.Pending));
            root.Tasks[6].Tasks[6].Tasks.Add(new Task("CD", "7.7.3", 5, Task.Finished));
            root.Tasks[6].Tasks.Add(new Task("BJ", "7.8", 20, Task.Started));
            root.Tasks[6].Tasks[7].Tasks.Add(new Task("CG", "7.8.1", 5, Task.Pending));
            root.Tasks[6].Tasks[7].Tasks.Add(new Task("CH", "7.8.2", 5, Task.Finished));

            root.Tasks.Add(new Task("H", "8", 300, Task.Started));
            root.Tasks[7].Tasks.Add(new Task("CI", "8.1", 100, Task.Started));
            root.Tasks[7].Tasks[0].Tasks.Add(new Task("CQ", "8.1.1", 15, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[0].Tasks.Add(new Task("CT", "8.1.1.1", 7, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[0].Tasks[0].Tasks.Add(new Task("CW", "8.1.1.1.1", 3, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[0].Tasks[0].Tasks.Add(new Task("CX", "8.1.1.1.2", 4, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[0].Tasks.Add(new Task("CU", "8.1.1.2", 4, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[0].Tasks.Add(new Task("CV", "8.1.1.3", 4, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks.Add(new Task("CR", "8.1.2", 45, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("CW", "8.1.2.1", 7, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("CX", "8.1.2.2", 3, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("CY", "8.1.2.3", 5, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("CZ", "8.1.2.4", 20, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks.Add(new Task("DC", "8.1.2.4.1", 15, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks[0].Tasks.Add(new Task("DF", "8.1.2.4.1.1", 5, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks[0].Tasks.Add(new Task("DG", "8.1.2.4.1.2", 7, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks[0].Tasks[1].Tasks.Add(new Task("DI", "8.1.2.4.1.2.1", 3, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks[0].Tasks[1].Tasks.Add(new Task("DJ", "8.1.2.4.1.2.2", 4, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks[0].Tasks.Add(new Task("DH", "8.1.2.4.1.3", 3, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks.Add(new Task("DD", "8.1.2.4.2", 3, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks[3].Tasks.Add(new Task("DE", "8.1.2.4.3", 2, Task.Pending));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("DA", "8.1.2.5", 3, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[1].Tasks.Add(new Task("DB", "8.1.2.6", 7, Task.Started));
            root.Tasks[7].Tasks[0].Tasks.Add(new Task("CS", "8.1.3", 30, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[2].Tasks.Add(new Task("DK", "8.1.3.1", 10, Task.Started));
            root.Tasks[7].Tasks[0].Tasks[2].Tasks.Add(new Task("DL", "8.1.3.2", 10, Task.Finished));
            root.Tasks[7].Tasks[0].Tasks[2].Tasks.Add(new Task("DM", "8.1.3.3", 10, Task.Pending));
            root.Tasks[7].Tasks[0].Tasks[2].Tasks[2].Tasks.Add(new Task("DN", "8.1.3.3.1", 5, Task.Pending));
            root.Tasks[7].Tasks[0].Tasks[2].Tasks[2].Tasks.Add(new Task("DO", "8.1.3.3.2", 5, Task.Pending));
            root.Tasks[7].Tasks.Add(new Task("CJ", "8.2", 50, Task.Started));
            root.Tasks[7].Tasks[1].Tasks.Add(new Task("DP", "8.2.1", 5, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks.Add(new Task("DQ", "8.2.2", 25, Task.Started));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks.Add(new Task("DT", "8.2.2.1", 15, Task.Started));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks[0].Tasks.Add(new Task("DW", "8.2.2.1.1", 9, Task.Started));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks[0].Tasks[0].Tasks.Add(new Task("DZ", "8.2.2.1.1.1", 4, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks[0].Tasks[0].Tasks.Add(new Task("DZ", "8.2.2.1.1.2", 5, Task.Started));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks[0].Tasks.Add(new Task("DX", "8.2.2.1.2", 2, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks[0].Tasks.Add(new Task("DY", "8.2.2.1.3", 4, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks.Add(new Task("DU", "8.2.2.2", 7, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks[0].Tasks.Add(new Task("DV", "8.2.2.3", 8, Task.Finished));
            root.Tasks[7].Tasks[1].Tasks.Add(new Task("DR", "8.2.3", 10, Task.Started));
            root.Tasks[7].Tasks[1].Tasks.Add(new Task("DS", "8.2.4", 10, Task.Finished));
            root.Tasks.Add(new Task("I", "9", 2, Task.Finished));
            return root;
        }
    }
}
